package com.baidu.mapapi;

import android.graphics.Point;
import android.os.Bundle;

class d
  implements Projection
{
  private MapView a = null;

  public d(MapView paramMapView)
  {
    this.a = paramMapView;
  }

  Point a(GeoPoint paramGeoPoint, Point paramPoint)
  {
    Bundle localBundle = new Bundle();
    localBundle.putInt("act", 15010200);
    localBundle.putInt("x", paramGeoPoint.getLongitudeE6());
    localBundle.putInt("y", paramGeoPoint.getLatitudeE6());
    Mj.sendBundle(localBundle);
    if (paramPoint == null)
      paramPoint = new Point(0, 0);
    paramPoint.x = localBundle.getInt("x");
    paramPoint.y = localBundle.getInt("y");
    return paramPoint;
  }

  public GeoPoint fromPixels(int paramInt1, int paramInt2)
  {
    int i = paramInt1 - this.a.b.c;
    int j = paramInt2 - this.a.b.d;
    if (this.a.b.e != 1.0D)
    {
      int m = (int)((i - this.a.b.f) / this.a.b.e);
      int n = (int)((j - this.a.b.g) / this.a.b.e);
      i = m + this.a.b.f;
      j = n + this.a.b.g;
    }
    Bundle localBundle = new Bundle();
    localBundle.putInt("act", 15010100);
    localBundle.putInt("x", i);
    localBundle.putInt("y", j);
    Mj.sendBundle(localBundle);
    int k = localBundle.getInt("x");
    return new GeoPoint(localBundle.getInt("y"), k);
  }

  public float metersToEquatorPixels(float paramFloat)
  {
    return (float)(paramFloat / this.a.h());
  }

  public Point toPixels(GeoPoint paramGeoPoint, Point paramPoint)
  {
    Bundle localBundle = new Bundle();
    localBundle.putInt("act", 15010200);
    localBundle.putInt("x", paramGeoPoint.getLongitudeE6());
    localBundle.putInt("y", paramGeoPoint.getLatitudeE6());
    Mj.sendBundle(localBundle);
    if (paramPoint == null)
      paramPoint = new Point(0, 0);
    paramPoint.x = localBundle.getInt("x");
    paramPoint.y = localBundle.getInt("y");
    if (this.a.b.e != 1.0D)
    {
      int i = (int)(0.5D + (paramPoint.x - this.a.b.f) * this.a.b.e);
      int j = (int)(0.5D + (paramPoint.y - this.a.b.g) * this.a.b.e);
      paramPoint.x = (i + this.a.b.f);
      paramPoint.y = (j + this.a.b.g);
    }
    paramPoint.x += this.a.b.c;
    paramPoint.y += this.a.b.d;
    return paramPoint;
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.baidu.mapapi.d
 * JD-Core Version:    0.6.2
 */